import Fluent

struct CreateCountry: Migration {
    
    func prepare(on database: Database) -> EventLoopFuture<Void> {
        database.schema("countries")
            .id()
            .field("iso", .string)
            .field("name", .string)
            .field("centerLatitude", .double)
            .field("centerLongitude", .double)
            .create()
    }
    
    func revert(on database: Database) -> EventLoopFuture<Void> {
        database.schema("countries").delete()
    }
    
}
